package com.tungse.eventTest;

import com.tungse.eventTest.pojo.MessageEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

@Component
public class MessageHanderTwo implements ApplicationListener<MessageEvent<?>> {

    @Override
    public void onApplicationEvent(MessageEvent<?> event) {
        System.out.println("MessageHanderTwo  收到消息：" + event.getMessage());
    }
}
